import 'package:fish_redux/fish_redux.dart';
import 'package:flutter/material.dart';

import 'action.dart';
import 'state.dart';

Widget buildView(ItemComponentState state, Dispatch dispatch, ViewService viewService) {
  return Container(
    width: double.infinity,
    height: 50,
    alignment: Alignment.center,
    child: GestureDetector(
      onTap: (){
        dispatch(ItemComponentActionCreator.onItemClick(state.index));
      },
      child: Container(
        width: double.infinity,
        height: 50,
        child: Text(state.title,textDirection: TextDirection.ltr,
          style: TextStyle(fontSize: 14),),
      ),
    ),
  );
}
